﻿@model IEnumerable<DogsClub.WebUI.Models.User>
<link href="~/Content/DataTables-1.10.4/css/jquery.dataTables.css" rel="stylesheet" />
<div class="ContenerAllUSer">
    <table class="table table-hover" id="table">
        <thead>
            <tr>
                <th class="ZagName">
                    @Html.DisplayName("Фамилия")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Имя")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Отчество")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Дата рождения")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Почта")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Телефон")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Регистрация")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Город")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Адрес")
                </th>
                <th class="ZagName">
                    @Html.DisplayName("Пол")
                </th>
                <th class="ZagName">
                    <p>Действие</p>
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.LastName)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.FirstName)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.MiddleName)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.BirthDate)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.Email)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.Phone)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.RegistrationDate)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.City)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.Address)
                    </td>
                    <td class="ZagValue2">
                        @Html.DisplayFor(modelItem => item.GetSex)
                    </td>
                    <td class="ZagValue2">
                        @Html.ActionLink("Просмотр", "FullShowItemUser", new { idUser = item.Id })
                    </td>
                </tr>
            }
        </tbody>
</table>
</div>
@section script {
    <script src="~/Scripts/bootstrap.js"></script>
    <script src="~/Scripts/DataTables-1.10.4/jquery.dataTables.js"></script>
    <script>
        $(document).ready(function () {
            $("#table").dataTable({
                "language": {
                    "lengthMenu": "Отображать _MENU_ записей на странице",
                    "zeroRecords": "Извините, таблица пуста",
                    "info": "Страница _PAGE_ из _PAGES_",
                    "infoEmpty": "Нет доступных записей",
                    "infoFiltered": "(filtered from _MAX_ total records)",
                    "paginate": {
                        "next": "Следующая страница",
                        "previous": "Предыдущая страница"
                    },
                    "search": "Найти"
                }
            });
        });
    </script>
}
